<template>
  <div class="table-component">
    <el-table :data="component.data" border height="100%">
      <el-table-column v-for="col in component.columns"
                       :key="col.prop"
                       :prop="col.prop"
                       :label="col.label">
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>
defineProps({
  component: {
    type: Object,
    required: true
  }
})
</script>

<style scoped>
.table-component {
  width: 100%;
  height: 100%;
  padding: 12px;
}
</style> 